/*
* @Author: yanxiaoli
* @Date:   2018-12-27 17:48:05
* @Last Modified by:   yanxiaoli
* @Last Modified time: 2018-12-29 17:37:29
*/
var cid = $('#container').data('cid');
var opt={
          getResource:function(index,render){//index为已加载次数,render为渲染接口函数,接受一个dom集合或jquery对象作为参数。通过ajax等异步方法得到的数据可以传入该接口进行渲染，如 render(elem)
              var html='';
              for(var i=0; i<20; i++){
                 var k = i;
                 k = '0' + (String(k).length==1?'0':'') + k;
                 var src="http://yl.sofedu.com/Public/images/images/p_"+k+".jpg";
                 html+='<div class="cell"><a href="" target="_blank"><img src="'+src+'" alt=""/><p>'+k+'</p></a></div>';
              }
              return $(html);
          },
          auto_imgHeight:true,
          insert_type:1
        }
        $('#container').waterfall(opt);